<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddGroupRewardsToConfigSalesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('config_sales', function (Blueprint $table) {
            $table->decimal('one_person_group_rewards', 10, 2)->default(20.00)->comment("邀请一人成团奖励");
            $table->decimal('two_person_group_rewards', 10, 2)->default(40.00)->comment("邀请两人成团奖励");
            $table->decimal('more_person_group_rewards', 10, 2)->default(100.00)->comment("邀请三人成团奖励");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('config_sales', function (Blueprint $table) {
            $table->dropColumn(['one_person_group_rewards','two_person_group_rewards','more_person_group_rewards']);
        });
    }
}
